package design.singleton;

/**
 * <p>
 * 登记式实现单例模式：
 * 延迟加载
 * 线程安全
 * 实现容易
 * </P>
 *
 * @author dingwen
 * @date 2021.10.14 16:23
 */
public class Singleton5 {

    private static class Singleton5Holder {
        private static final Singleton5 INSTANCE = new Singleton5();
    }

    private Singleton5() {
    }

    public static Singleton5 getInstance() {
        return Singleton5Holder.INSTANCE;
    }
}
